import { defineStore } from 'pinia';

export const useUserStore = defineStore('user', {
    state: () => ({
        name: '',
        age: 20,
    }),
    actions: {
        set_name(name) {
            this.name = name;
        },
        set_age(age) {
            this.age = age;
        },
    },
    getters: {
        doubleAge: (state) => state.age * 2,
    },
});